/*
 * Copyright (c) Family. All Rights Reserved
 */

package com.driving.exam.entity;

import java.io.Serializable;
import java.util.List;

import org.apache.ibatis.type.Alias;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Getter;
import lombok.Setter;

/**
 * 练习题
 *
 * @author SAGITTAR
 */
@Getter
@Setter
@Alias(value = "Exercise")
@TableName(value = "tb_exercise")
public class Exercise extends Model<Exercise> {

    private static final long serialVersionUID = 3089168722572675475L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "subject_id")
    private Integer subjectId;

    @TableField(value = "type")
    private String type;

    @TableField(value = "chapter")
    private Integer chapter;

    @TableField(value = "category")
    private Integer category;

    @TableField(value = "title")
    private String title;

    @TableField(value = "choice_list")
    public List<String> choiceList;

    @TableField(value = "answer")
    private Integer answer;

    @TableField(value = "explanation")
    private String explanation;

    @TableField(value = "difficulty")
    private Integer difficulty;

    @TableField(value = "picture")
    private String picture;

    @TableField(value = "ordinal")
    private Integer ordinal;

    @Override
    public Serializable pkVal() {
        return id;
    }
}
